<div id="border">
<form name="" method="post" action="javascript:goto_search()">   
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
     <tr>
     <td valign="top">       
        <table width="705" border="0" align="center" id="usertitle">
          <tr>
            <td class="mapsite">
            	<a href="<?=site_url("main")?>">HOME</a>&nbsp;&nbsp;
                <img src="<?=base_url();?>images/icon_list_separator_breadcrumb.png" width="12" height="12" align="absbottom" />&nbsp;&nbsp;
                <a href="<?=site_url("classify")?>">Classified Ads</a>&nbsp;&nbsp;
                <img src="<?=base_url();?>images/icon_list_separator_breadcrumb.png" width="12" height="12" align="absbottom" />&nbsp;&nbsp;
                View all
            </td>
            <td align="right">
            <a href="<?=site_url("classify/goto_addnew_classify");?>"><input class="post_ads" name="" type="button" value=" <?=$Z_TRANS->value('menu_post_ads')?> " /></a>
            </td>
          </tr>
        </table>
        <div id="content">
        	<div style="text-align:right; margin-top:7px; margin-right:5px;">
            	<?=$Z_TRANS->value('menu_search')?>: 
                <input type="text" id="txtsearch" name="txtsearch" maxlength="80" /> 
                <?=$Z_TRANS->value('menu_in')?> <select id="cbocategory" name="cbocategory">
               <option value="0">All Categories</option>
               <?php foreach($all_cate->result() as $category):?>
               <option value="<?=$category->classify_id;?>"><?=$category->classify_desc;?></option>
               <?php endforeach; ?>
                </select>
                <input type="button" id="btnsearch" name="btnsearch" value="<?=$Z_TRANS->value('btn_search')?>" onclick="goto_search()" />
             </div>
        	<div class="user_line_border_top">&nbsp;</div>
            <div style="margin:10px auto;"></div>
                <?php $str_path = str_replace("\\", "/", FCPATH);
                foreach($all_ads->result() as $ads):?>
                <table width="100%" border="0" class="left_ttb_border f-12px">
                    <tr>
                      <td width="85" valign="top" align="center"><a href="<?=site_url("classify/goto_classify_detail/$ads->product_id")?>">
                 	  <?php $getimg=$this->m_classify->select_first_img($ads->product_id);
					  	$filename =$str_path.$ads->file_path.$getimg['img_name'];?>
					  <?php if($getimg['img_name']<>'' && file_exists ($filename)){ ?>
                        <img src="<?=base_url();?><?=$ads->file_path;?><?=$getimg['img_name'];?>" width="68" height="68"/>
                      <?php }else{?>
                        <img src="<?=base_url();?>images/nopic.gif" width="68"/>
                      <? } ?>
                      </a>
                      </td>
                      <td width="450" valign="top"><b><a href="<?=site_url("classify/goto_classify_detail/".$ads->product_id)?>">
					  <?=substr(htmlspecialchars($ads->product_name),0,90)." ";?></a> &nbsp;<span class="price">$<?=$ads->price;?></span></b><br />
                      <?=substr(htmlspecialchars($ads->product_desc),0,100)."..";?>
                      </td>
                      <td width="85" valign="top" class="price"><br /></td>
                      <td width="99" valign="top">Close date:<?=htmlspecialchars(date_postgres_to_html($ads->date_close));?><br />
          					<?=$Z_TRANS->value('title_from')?> <font color="#0085CF">
							<?=$ads->user_login;?></font><br /> <?php $total_hit=$this->m_classify->get_product_hit($ads->product_id); ?>
          					<font color="#FF0000"><?=count($total_hit->result());?></font> <?=$Z_TRANS->value('title_hit')?>
         				</td>
                    </tr>
                </table>
                <? endforeach;?>
           
			<div class="pagination"><?php echo $this->pagination->create_links(); ?></div>
        </div>
        <a href="http://www.asiagarden.com.kh/mk.htm" target="_blank"><img src="<?=base_url();?>ads/mk_780x100.gif" width="705" height="80" border="0" /></a>  
        </td>
        <td width="254" valign="top">
			<?php include APPPATH."views/templates/common/right_content.php"; ?>
         </td>
         
      </tr>
  </table>
  
  </form>
</div>



